home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 8.8 KB | 375 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLFilRep.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * File: SLFilRep.idl
- *
- * Contains: Interface for FW_OFile class
- * Release Version: $ ODF 1 $
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- */
-
-
- #ifndef SOM_FW_OFile_xh
- #define SOM_FW_OFile_xh
-
- class FW_OFile;
-
- #define FW_OFile_MajorVersion 1
- #define FW_OFile_MinorVersion 0
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
-
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_FW_ORefCount_xh
- #include <SLRefCnt.xh>
- #endif
-
- #ifndef FW_OFile_API
- #define FW_OFile_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_ORefCount;
- class FW_OFileSpecification;
- class FW_ODirectorySpecification;
- class FW_OFile;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_OFileCClassData FW_OFileClassData
- #define FW_OFileNewClass(major,minor) somNewVersionedClassReference(FW_OFile,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_OFileMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_OFile class object, and the methods it introduces. */
- SOMEXTERN struct FW_OFileClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken somInit;
- somMToken somUninit;
- somMToken InitWithExclusiveAccess;
- somMToken InitWithPermissions;
- somMToken Read;
- somMToken Write;
- somMToken GetLength;
- somMToken SetLength;
- somMToken GetPosition;
- somMToken SetPosition;
- somMToken BytesToEndOfFile;
- somMToken GetPermissions;
- somMToken GetFileSpecification;
- somMToken GetFileHandle;
- somMToken IsEqual;
- } SOMDLINK FW_OFileClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_OFile_Class_Source) && !defined(SOM_Module_slfilrep_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_OFileClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_OFile Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_FW_OFile_InitWithExclusiveAccess)(FW_OFile *somSelf, Environment *ev,
- FW_OFileSpecification* fileSpecification,
- FW_Boolean allowCreate);
- typedef void (* SOMLINK somTD_FW_OFile_InitWithPermissions)(FW_OFile *somSelf, Environment *ev,
- FW_OFileSpecification* fileSpecification,
- FW_SAccessPermission* permission,
- FW_Boolean allowCreate);
- typedef void (* SOMLINK somTD_FW_OFile_Read)(FW_OFile *somSelf, Environment *ev,
- void* destination,
- long count);
- typedef void (* SOMLINK somTD_FW_OFile_Write)(FW_OFile *somSelf, Environment *ev,
- void* source,
- long count);
- typedef long (* SOMLINK somTD_FW_OFile_GetLength)(FW_OFile *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_FW_OFile_SetLength)(FW_OFile *somSelf, Environment *ev,
- long length);
- typedef long (* SOMLINK somTD_FW_OFile_GetPosition)(FW_OFile *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_FW_OFile_SetPosition)(FW_OFile *somSelf, Environment *ev,
- long positioningMode,
- long markOffset);
- typedef long (* SOMLINK somTD_FW_OFile_BytesToEndOfFile)(FW_OFile *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_FW_OFile_GetPermissions)(FW_OFile *somSelf, Environment *ev,
- FW_SAccessPermission* thePerms);
- typedef FW_OFileSpecification* (* SOMLINK somTD_FW_OFile_GetFileSpecification)(FW_OFile *somSelf, Environment *ev);
- typedef FW_FileAccessHandle* (* SOMLINK somTD_FW_OFile_GetFileHandle)(FW_OFile *somSelf, Environment *ev);
- typedef FW_Boolean (* SOMLINK somTD_FW_OFile_IsEqual)(FW_OFile *somSelf, Environment *ev,
- FW_OFile* theOtherFile);
- }
-
- #endif /* FW_OFile_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for FW_OFile
- */
- class FW_OFile : public FW_ORefCount
- {
- public:
-
- // FW_OFile::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for FW_OFile, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_OFile);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_OFile);
- #endif
- }
-
- // FW_OFile::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: InitWithExclusiveAccess */
- void InitWithExclusiveAccess(Environment *ev,
- FW_OFileSpecification* fileSpecification,
- FW_Boolean allowCreate)
- {
- SOM_ResolveD(this,FW_OFile,FW_OFile,InitWithExclusiveAccess)
- (this,ev,fileSpecification,allowCreate);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: InitWithPermissions */
- void InitWithPermissions(Environment *ev,
- FW_OFileSpecification* fileSpecification,
- FW_SAccessPermission* permission,
- FW_Boolean allowCreate)
- {
- SOM_ResolveD(this,FW_OFile,FW_OFile,InitWithPermissions)
- (this,ev,fileSpecification,permission,allowCreate);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: Read */
- void Read(Environment *ev,
- void* destination,
- long count)
- {
- SOM_ResolveD(this,FW_OFile,FW_OFile,Read)
- (this,ev,destination,count);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: Write */
- void Write(Environment *ev,
- void* source,
- long count)
- {
- SOM_ResolveD(this,FW_OFile,FW_OFile,Write)
- (this,ev,source,count);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetLength */
- long GetLength(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- long __somResult =
- SOM_ResolveD(this,FW_OFile,FW_OFile,GetLength)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OFile,FW_OFile,GetLength)
- (this,ev);
- #endif
- }
-
- /* method: SetLength */
- void SetLength(Environment *ev,
- long length)
- {
- SOM_ResolveD(this,FW_OFile,FW_OFile,SetLength)
- (this,ev,length);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetPosition */
- long GetPosition(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- long __somResult =
- SOM_ResolveD(this,FW_OFile,FW_OFile,GetPosition)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OFile,FW_OFile,GetPosition)
- (this,ev);
- #endif
- }
-
- /* method: SetPosition */
- void SetPosition(Environment *ev,
- long positioningMode,
- long markOffset)
- {
- SOM_ResolveD(this,FW_OFile,FW_OFile,SetPosition)
- (this,ev,positioningMode,markOffset);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: BytesToEndOfFile */
- long BytesToEndOfFile(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- long __somResult =
- SOM_ResolveD(this,FW_OFile,FW_OFile,BytesToEndOfFile)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OFile,FW_OFile,BytesToEndOfFile)
- (this,ev);
- #endif
- }
-
- /* method: GetPermissions */
- void GetPermissions(Environment *ev,
- FW_SAccessPermission* thePerms)
- {
- SOM_ResolveD(this,FW_OFile,FW_OFile,GetPermissions)
- (this,ev,thePerms);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetFileSpecification */
- FW_OFileSpecification* GetFileSpecification(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- FW_OFileSpecification* __somResult =
- SOM_ResolveD(this,FW_OFile,FW_OFile,GetFileSpecification)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OFile,FW_OFile,GetFileSpecification)
- (this,ev);
- #endif
- }
-
- /* method: GetFileHandle */
- FW_FileAccessHandle* GetFileHandle(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- FW_FileAccessHandle* __somResult =
- SOM_ResolveD(this,FW_OFile,FW_OFile,GetFileHandle)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OFile,FW_OFile,GetFileHandle)
- (this,ev);
- #endif
- }
-
- /* method: IsEqual */
- FW_Boolean IsEqual(Environment *ev,
- FW_OFile* theOtherFile)
- {
- #ifdef SOMCHKEXCEPT
- FW_Boolean __somResult =
- SOM_ResolveD(this,FW_OFile,FW_OFile,IsEqual)
- (this,ev,theOtherFile);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OFile,FW_OFile,IsEqual)
- (this,ev,theOtherFile);
- #endif
- }
-
- }; /* FW_OFile */
-
-
-
- #endif /* SOM_FW_OFile_xh */
-